#include <stdio.h>
#include <string.h>

#include "mystdio.h"

int main()
{
    MY_FILE* fp = my_fopen("./log.txt", "w");
    if (fp == NULL)
    {
        perror("fopen");
        return 1;
    }

    const char* str = "hello fputs\n";
    int cnt = 10;
    while (cnt--)
    {
        my_fputs(str, fp);
    }

    my_fclose(fp);

    return 0;
}
